import http from '../../apis/api.js';
import util from '../../utils/util.js';
import config from '../../config.js';
const app = getApp();
let self;
let timeName;
Page({
  /**
   * 页面的初始数据
   */
  data: {
    ownStst:'',
    imgSrc: "/images/paseBg.jpg",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    self = this;
    self.data.ownStst = options.ownStst;
    self.setData({
      ownStst: self.data.ownStst
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    switch (self.data.ownStst) {
      /**待审核 */
      case "50500102":
        wx.setNavigationBarTitle({
          title: '审核中'
        })
        break;
      /**认证不通过 */
      case "50500104":
        wx.setNavigationBarTitle({
          title: '审核不通过'
        })
        break;
    }
  },
  footerBind(e) {
    let type = e.currentTarget.dataset.type;
    wx
    if (type == "contact") {
      wx.makePhoneCall({
        phoneNumber: config.tel
      })
    } else {
      wx.navigateTo({
        url: `/pages/changeLandlord/changeLandlord?examine='examine'`
      })
    }
  }
})